<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<?php if(isset($news_info)){?>
			    <li>
			    <if condition="$news_info.type eq 4">
			    	<if condition="$news_info.special_news_id neq 0">
			    		<a href="{:U('Admin/NewsVideo/index', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id'],'type'=>'2'))}">新闻详情</a>
			    	<else />
			    		<a href="{:U('Admin/NewsVideo/index', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id']))}">新闻详情</a>
			    	</if>
				<elseif condition="$news_info.type eq 3"/>
					<if condition="$news_info.special_news_id neq 0">
			    		<a href="{:U('Admin/Special/index', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id'],'type'=>'2'))}">新闻详情</a>
			    	<else />
			    		<a href="{:U('Admin/Special/index', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id']))}">新闻详情</a>
			    	</if>
				<elseif condition="$news_info.type eq 5"/>
					<if condition="$news_info.special_news_id neq 0">
			    		<a href="{:U('Admin/NewsManage/pictureAdd', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id'],'type'=>'2'))}">新闻详情</a>
			    	<else />
			    		<a href="{:U('Admin/NewsManage/pictureAdd', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id']))}">新闻详情</a>
			    	</if>
				<else />
					<if condition="$news_info.special_news_id neq 0">
			    		<a href="{:U('Admin/NewsManage/publish', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id'],'type'=>'2'))}">新闻详情</a>
			    	<else />
			    		<a href="{:U('Admin/NewsManage/publish', array('news_id'=>$news_info['news_id'], 'column_id'=>$news_info['column_id']))}">新闻详情</a>
			    	</if>
			    </if>
			    </li>
		    <?php }?>
			<li class="active"><a href="{:U('Admin/NewsComment/index',array('newsId'=>$_GET['newsId']))}">新闻评论列表</a></li>
		</ul>
		
    <form class="well form-search" id="query_form" method="post" action="{:U('Admin/News/index')}">
        关键字：<input type="text" name="keyword" style="width: 120px;" value="{$formParam.keyword}" placeholder="关键字...">
        开始时间：<input type="text" name="startDate" style="width: 120px;" value="{$formParam.startDate}" placeholder="开始时间..." class="js-datetime" >
        结束时间：<input type="text" name="endDate" style="width: 120px;" value="{$formParam.endDate}" placeholder="结束时间..." class="js-datetime">
        <input type="hidden" name="news_id" value="{$news_info.news_id}" >
        <input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/NewsComment/index')}"  class="btn btn-primary" value="查询"/>
        <br/><br/>
        
    </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>序号</th>
					<th>用户昵称</th>
					<th>评论内容</th>
					<th>评论时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data" item="vo">
				<tr>
					<td >{$key+1}</td>
					<td >{$vo.nickname}</td>
					<td>{$vo.content}</td>
					<td>{$vo.createdOnUTC|strtotime|date="Y-m-d H:i:s",###}</td>
					
					<td>
					<a href="{:U('Admin/NewsComment/del',array('commentId'=>$vo['comment_id'],'news_id'=>$vo['news_id']))}" class="js-ajax-dialog-btn"
                           data-msg="确定要删除此评论吗？">删除</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		
	});
	
	jeDate({
		dateCell:"#indate",//isinitVal:true,
		format:"YYYY-MM",
		isTime:false, //isClear:false,
		minDate:"2015-10-19 00:00:00",
		maxDate:"2016-11-8 00:00:00"
	})
    jeDate({
		dateCell:"#dateinfo",
		format:"YYYY年MM月DD日 hh:mm:ss",
		isinitVal:true,
		isTime:true, //isClear:false,
		minDate:"2014-09-19 00:00:00",
		okfun:function(val){alert(val)}
	})
	</script>
</body>
</html>